<template>
	<view class="orderGoods borRadius14">
		<!-- {{typeof(cartInfo)}} -->
		<view class='goodWrapper pad30'>
			<view class='item acea-row row-between-wrapper'>
				<view class='pictrue'>
					<image :src='cartInfo.image'></image>
				</view>
				<view class='text'>
					<view class='acea-row row-between-wrapper'>
						<view class='name line2'>{{cartInfo.name}}</view>

					</view>
					<view class="money font-color">
						<text>{{cartInfo.packageType}}</text>
					</view>


					<!--  v-if='item.isReply==0 && evaluate==2' -->

					<!-- <view class='evaluate' v-else-if="item.isReply==1">已评价</view> -->
				</view>

			</view>
			<view class='evaluate dis'>
				<view class="bnt">查看直播</view>

				<view class="bnt" v-if="cartInfo.showTrans"
					@click="goPage(`/pagesB/fosterOrder/increaseTransferring/index?order_id=${cartInfo.orderId}&&id=${cartInfo.id}`)">
					转赠
				</view>
				<!-- 	<view class='bnt' @click="go()" v-if="cartInfo.deliveryType == 'express' && cartInfo.status >0">
					查看物流
				</view> -->

				<view class="bnt" v-if="cartInfo.paid&&cartInfo.showTrans"
					@click="goPage('/pagesB/fosterOrder/increaseTransferring/record?order_id='+cartInfo.id)">转赠记录
				</view>
				<!-- <view @click="goPage('/pagesB/shoppingMall/logistics/index')">查看物流</view> -->
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		props: {
			evaluate: {
				type: Number,
				default: 0,
			},
			cartInfo: {
				type: Object,
				default: function() {
					return {};
				}
			},
			orderId: {
				type: String,
				default: '',
			},
			ids: {
				type: Number,
				default: 0,
			},
			jump: {
				type: Boolean,
				default: false,
			},
			orderProNum: {
				type: Number,
				default: function() {
					return 0;
				}
			},
			productType: {
				type: Number,
				default: function() {
					return 0;
				}
			}
		},
		data() {
			return {
				totalNmu: ''
			};
		},
		watch: {
			cartInfo: function(nVal, oVal) {

				let num = 0
				nVal.forEach((item, index) => {
					num += item.cartNum
				})
				this.totalNmu = num
			}
		},
		methods: {
			go() {
				uni.navigateTo({
					url: '/pages/users/goods_logistics/index?orderId=' + this.cartInfo.orderId
				})
			},
			goPage(url) {
				uni.navigateTo({
					url
				})
			},
			evaluateTap(item) {
				uni.navigateTo({
					url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this
						.orderId + '&id=' + this.ids
				})
			},
			jumpCon: function(id) {
				let type = this.productType == 0 ? 'normal' : 'video'
				if (this.jump) {
					uni.navigateTo({
						url: `/pages/activity/goods_details/index?id=${id}&type=${type}`
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.goodWrapper {
		padding: 30rpx;
	}

	.evaluate {
		justify-content: flex-end;
		margin: 20rpx 0;

		.bnt {
			width: 150rpx;
			text-align: center;
			height: 54rpx;
			background: $maincolor;
			border-radius: 60rpx;
			margin-right: 20rpx;
			opacity: 1;
			line-height: 54rpx;
			color: #fff;
		}
	}

	.money text {
		padding: 5rpx 22rpx;
		border-radius: 100rpx;
		border: 1rpx solid $maincolor;
	}

	.orderGoods {
		background-color: #fff;
		margin-top: 15rpx;
	}

	.orderGoods .total {
		width: 100%;
		height: 86rpx;
		padding: 0 24rpx;
		border-bottom: 2rpx solid #f0f0f0;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		box-sizing: border-box;
	}

	.pictrue image {
		background: #f4f4f4;
	}
</style>